import React, { useRef, useEffect } from 'react'
import { View, StyleSheet, Text } from 'react-native'

function ViewDemo() {
  const viewRef = useRef(null);

  useEffect(() => {
    console.log('hhhh');
  }, []);

  return (
    <View style={styles.rooot}>
      <View
        ref={viewRef}
        style={styles.subView}
      />
      <Text style={styles.txt}>
        本次期末考试
      </Text>
    </View>
  )
}

const styles = StyleSheet.create({
  rooot: {
    flexDirection: 'column',
    width: '100%',
    height: '100%',
    backgroundColor: '#C0C0C0',
  },
  subView: {
    width: 200,
    height: 200,
    backgroundColor: 'red',
  },
  txt: {
    fontSize: 40,
    fontWeight: 'bold',
    color: '#3025ff',
    textShadowColor: '#A0A0A0',
    textShadowOffset: { width: 2, height: 4 },
    textShadowRadius: 6,
  }
});

export default ViewDemo